/*
 * Copyright © 2017 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
*/

$submenu_color: #cccccc;
$disabled_menu_hover_bg_color: gray;
$submenu_bg_color: white;
$add_button_color: #0099ff;
$width_popover: 180px;

.rule-book-popover {
  position: relative;
  display: inline-block;

  .btn.btn-secondary {
    border-radius: 0;
    color: $add_button_color;
  }

  .sub-menu {
    position: absolute;
    background: $submenu_bg_color;
    top: 0;
    left: 100%;
    z-index: 1000;
    box-shadow: 1px 2px 5px $submenu_color;
    min-width: $width_popover;
    border: 1px solid $submenu_color;

    > div {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: $width_popover;
    }

    &.empty {
      color: $submenu_color;
      cursor: not-allowed;
      > div:hover {
        color: $disabled_menu_hover_bg_color;
      }
    }
    > div {
      padding: 5px;
      &:hover {
        background: $submenu_color;
      }
    }
  }
}
